<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>6-8</title>
</head>

<body>
    <div>
        <p id="p1">javascript程序设计</p>
        <p>JavaScript是一门功能强大的编程语言</p>
        <p>第一部分JavaScript概述</p>
        <p>JavaScript的发展历史</p>
    </div>
    <input type="button" value="删除p元素">
    <script>
        var button = document.querySelector('input');
        button.onclick = function() {
            var div = document.querySelector('div');
            div.removeChild(div.children[1]);
        }
    </script>
</body>

</html>